#ifndef ANIMATIONTEXT_H
#define ANIMATIONTEXT_H

#include <QComboBox>
#include <QLabel>
#include <QWidget>

class AnimationText : public QLabel
{
    Q_OBJECT
    Q_PROPERTY(QStringList textList READ textList WRITE setTextList NOTIFY textListChanged)
    Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)

public:
    explicit AnimationText(QComboBox *parent = nullptr);

    QStringList textList() const;
    void setTextList(const QStringList &newTextList);

    QStringList generateAnimationTextList(QStringList newTextList);
    void showAnimationText();

    int currentIndex() const;
    void setCurrentIndex(int newCurrentIndex);

signals:
    void textListChanged();

    void currentIndexChanged();

private:
    QStringList m_textList;

    QComboBox* m_parent;
    int m_currentIndex = 0;
};

#endif // ANIMATIONTEXT_H
